/**
 * Huisou.com Inc.
 * Copyright (c) 2011-2012 All Rights Reserved.
 */

package com.chenzehe.zdmya.domain;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * @description
 * 
 * @author chenzehe
 * @email hljuczh@163.com
 * @create 2012-8-14 下午08:14:17
 */
@Entity
@Table(name = "tbl_collection")
public class Collection {
	@Id
	@Column(name = "id")
	@GeneratedValue
	private Integer id;

	@Column(name = "content_id")
	private Integer contentId;

	@Column(name = "type")
	private Integer type;

	@Column(name = "user_id")
	private Integer userId;

	@Column(name = "issue_time")
	private Date issueTime;

	@Transient
	private String title;

	@Transient
	private String img;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public Integer getContentId() {
		return contentId;
	}

	public void setContentId(Integer contentId) {
		this.contentId = contentId;
	}

	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public Date getIssueTime() {
		return issueTime;
	}

	public void setIssueTime(Date issueTime) {
		this.issueTime = issueTime;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getImg() {
		return img;
	}

	public void setImg(String img) {
		this.img = img;
	}

	public static enum CollectionType {
		CONTENT {
			@Override
			public int type() {
				return 1;
			}
		},
		FX {
			@Override
			public int type() {
				return 2;
			}
		},
		JY {
			@Override
			public int type() {
				return 3;
			}
		};
		public abstract int type();
	}
}
